/**
 * 
 */
package edu.umuc.cmsc495_final_project;

import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;

/**
 * @author dlipp
 *
 */
public class managerGUI extends JFrame implements allGUI {
	
	JPanel managerPanelOptions;
	
	JButton hostess;
	JButton kitchen;
	JButton bar;
	JButton server;
	
	JSplitPane splitPane;

	private int screenSizeX;
	private int screenSizeY;
	
	public managerGUI(){

		System.out.println("opening manager panel");
		
		screenSizeX = panelWidth;
		screenSizeY = panelHeight;
		
		// 
		setName("Manager");
		setBounds(0,panelStartY,screenSizeX,panelEndHeight);
		setVisible(true);
		setLayout(new BorderLayout());
		removeNotify();  
		setUndecorated(true);  
		addNotify();  
		
		// show main body
		mainBody();
	}

	public void mainBody() {
		Font font = new Font("Verdana", Font.BOLD, 40);
		
		// create manager panel
		managerPanelOptions = new JPanel();
		managerPanelOptions.setLayout( new GridBagLayout());
		managerPanelOptions.setVisible(true);
		add(managerPanelOptions);
		
		//setup for layout
		GridBagConstraints c = new GridBagConstraints();
		        
		// hotess button
		hostess = new JButton("Hostess");
		hostess.setFont(font);
		hostess.setVisible(true);
		
		// kitchen button 
		kitchen = new JButton("Kitchen");
		kitchen.setFont(font);
		kitchen.setVisible(true);
		
		// bar button
		bar = new JButton("Bar");
		bar.setFont(font);
		bar.setVisible(true);
		
		// server button
		server = new JButton("Server");
		server.setFont(font);
		server.setVisible(true);
		
		// add buttons to grid layout and manager panel container
		c.fill = GridBagConstraints.BOTH;
		c.insets = new Insets(10,10,10,10);
		c.ipadx = 100;
		c.ipady = 100;
		c.gridx = 0;
		c.gridy = 0;
		managerPanelOptions.add(hostess,c);
		
		c.fill = GridBagConstraints.BOTH;
		c.insets = new Insets(10,10,10,10);
		c.ipadx = 100;
		c.ipady = 100;
		c.gridx = 1;
		c.gridy = 0;
		managerPanelOptions.add(kitchen,c);
		
		c.fill = GridBagConstraints.BOTH;
		c.insets = new Insets(10,10,10,10);
		c.ipadx = 100;
		c.ipady = 100;
		c.gridx = 0;
		c.gridy = 1;
		managerPanelOptions.add(bar,c);
		
		c.fill = GridBagConstraints.BOTH;
		c.insets = new Insets(10,10,10,10);
		c.ipadx = 100;
		c.ipady = 100;
		c.gridwidth = 2;
		c.gridx = 1;
		c.gridy = 1;
		managerPanelOptions.add(server,c);
		
		/*
		// full split pane window
		splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, managerPanelOptions, null);
		splitPane.setOneTouchExpandable(true);
		splitPane.setDividerLocation((int)(screenSizeX*.80));
		
		// add to frame
		add(splitPane);
		*/
		add(managerPanelOptions);
	}
}